package com.by.feignservice;

import cn.heimi.dto.OrderQueryDTO;
import cn.heimi.dto.OrderingDTO;
import cn.heimi.dto.OrderingOkDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;


@FeignClient(name = "order-service")
@RequestMapping("/api/order")
public interface OrderService {
    @GetMapping("/ordering")
    String getOrder();


    @RequestMapping("/ordering2")
    OrderingOkDTO ordering2();

    @PostMapping("/ordering3")
     OrderingOkDTO ordering3(@RequestBody OrderingDTO orderingDTO);

    @GetMapping ("/select")
     String select(@SpringQueryMap OrderQueryDTO orderQueryDTO);

    @GetMapping("/sleep")
    String sleep(@RequestParam Integer time);
}
